package com.example.forjava.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Aspect
@Component
@Order(1)
public class LogAdviceTwo {

    // 定义一个切点：所有被GetMapping注解修饰的方法会织入advice
    @Pointcut("within(com.*..*Controller)")
    private void log() {}




    @Around("log()")
    public Object logAdviceAround(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
        System.out.println("22222222222222222222222");
        return proceedingJoinPoint.proceed();
    }

}
